package com.alpha.eceasy.mall.api.dto;

import com.alpha.eceasy.mall.api.entity.MallCommoditySpecification;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import org.springframework.beans.BeanUtils;

import java.math.BigDecimal;
import java.util.List;

@EqualsAndHashCode(callSuper = true)
@AllArgsConstructor
@NoArgsConstructor
@Data
public class MallCommoditySpecificationDTO extends MallCommodityDTO {
    @Schema(description =  "规格名称")
    @NotBlank(message = "规格名称不能为空!")
    private String specificationName;
    @Schema(description =  "规格图片")
    @NotNull(message = "商品详情图不能为空!")
    private List<String> specificationCoverList;
    @Schema(description = "库存量单位")
    @NotBlank(message = "sku不能为空!")
    private String sku;
    @Schema(description = "销售价格")
    private BigDecimal sellPrice;
    @Schema(description = "最小起订量")
    private Integer moq;
}
